package com.telecom.cms.service;

import java.util.List;
import com.telecom.cms.dao.CampCampPromDAO;
import com.telecom.cms.dto.CampCampProm;
import com.telecom.cms.dto.CampCampProm;

public class CampCampPromMgr {
   
	public void save(CampCampProm campcamp){
		(new CampCampPromDAO()).insert(campcamp);
	}
	
	public void  delete(CampCampProm campcamp){
		(new CampCampPromDAO()).delete(campcamp);
	}
	
	public void  deletebycampid(String campid){
		CampCampProm inst=new CampCampProm();
		inst.setCampId(Integer.parseInt(campid));
		(new CampCampPromDAO()).delete(inst);
	}
	
	public List findall(){
		List result=(new CampCampPromDAO()).findAll();
		return result;
	}
	
	public List findall(String campid){
		List result=(new CampCampPromDAO()).findAll(campid);
		return result;
	}
	
	public CampCampProm findbyid(String campid){
		CampCampProm result=(new CampCampPromDAO()).findById(campid);
		return result;
	}
}
